# Copyright 2024 The Kumo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

kmcmake_cc_test(
        NAME exec_test
        MODULE compute
        SOURCES exec_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME expression_test
        MODULE compute
        SOURCES expression_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::kmock
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME function_test
        MODULE compute
        SOURCES function_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME kernel_test
        MODULE compute
        SOURCES kernel_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME key_hash_test
        MODULE compute
        SOURCES key_hash_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME light_array_test
        MODULE compute
        SOURCES light_array_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME registry_test
        MODULE compute
        SOURCES registry_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME util_internal_test
        MODULE compute
        SOURCES util_internal_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)
kmcmake_cc_test(
        NAME compare_test
        MODULE compute
        SOURCES row/compare_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME grouper_test
        MODULE compute
        SOURCES row/grouper_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_library(
        NAMESPACE nebula
        NAME compute_test_util
        SOURCES
        kernels/test_util.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        PLINKS
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME aggregate_test
        MODULE compute
        SOURCES kernels/aggregate_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME codegen_internal_test
        MODULE compute
        SOURCES kernels/codegen_internal_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_arithmetic_test
        MODULE compute
        SOURCES kernels/scalar_arithmetic_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_boolean_test
        MODULE compute
        SOURCES kernels/scalar_boolean_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_cast_test
        MODULE compute
        SOURCES kernels/scalar_cast_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_compare_test
        MODULE compute
        SOURCES kernels/scalar_compare_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_if_else_test
        MODULE compute
        SOURCES kernels/scalar_if_else_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_nested_test
        MODULE compute
        SOURCES kernels/scalar_nested_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_random_test
        MODULE compute
        SOURCES kernels/scalar_random_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_round_arithmetic_test
        MODULE compute
        SOURCES kernels/scalar_round_arithmetic_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)
kmcmake_cc_test(
        NAME scalar_set_lookup_test
        MODULE compute
        SOURCES kernels/scalar_set_lookup_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_string_test
        MODULE compute
        SOURCES kernels/scalar_string_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_temporal_test
        MODULE compute
        SOURCES kernels/scalar_temporal_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME scalar_validity_test
        MODULE compute
        SOURCES kernels/scalar_validity_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME select_k_test
        MODULE compute
        SOURCES kernels/select_k_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME vector_cumulative_ops_test
        MODULE compute
        SOURCES kernels/vector_cumulative_ops_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME vector_hash_test
        MODULE compute
        SOURCES kernels/vector_hash_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME vector_nested_test
        MODULE compute
        SOURCES kernels/vector_nested_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME vector_pairwise_test
        MODULE compute
        SOURCES kernels/vector_pairwise_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME vector_replace_test
        MODULE compute
        SOURCES kernels/vector_replace_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME vector_run_end_encode_test
        MODULE compute
        SOURCES kernels/vector_run_end_encode_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME vector_selection_test
        MODULE compute
        SOURCES kernels/vector_selection_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME vector_sort_test
        MODULE compute
        SOURCES kernels/vector_sort_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::compute_test_util
        ${KMCMAKE_DEPS_LINK}
)